home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / programs / wb / groupinfo / groupinfo.doc < prev    next >
Text File  |  1995-02-13  |  17KB  |  446 lines

  1.  
  2.    GroupInfo version 1.04, copyright 1992  Nicolas Dade.
  3.  
  4. All rights reserved. Permission is hereby granted for non-commercial
  5. duplication and distribution, and for distribution by BBSs which do
  6. not change for downloads, and for distribution in disk collections
  7. which charge a nominal fee per disk.
  8.  
  9.  
  10.  
  11.  
  12.   Description:
  13.  
  14. GroupInfo is to a group of files what the C= supplied Information
  15. (in the workbench Icons menu) is to one. It allows the manipulation
  16. of a set of files and their .info files in one operation. It
  17. requires at least WB 2.04.
  18.  
  19.  
  20.  
  21.  
  22.  
  23.   Use:
  24.  
  25. You can select some files and/or dirs to manipulate, and then
  26. double-click on GroupInfo. Or you can just start it going by itself,
  27. and select the files and dirs to manipulate once GroupInfo is going
  28. (by pressing the [Add...] Objects button).
  29.  
  30. You can also start GroupInfo from a shell, but if it is started from
  31. a shell it cannot read it's tooltypes, save its preferences, and
  32. cannot be passed a list of objects.
  33.  
  34. But the most logical way I've found is to put it in the workbench's
  35. Tools menu using any of the Tools menu manipulation programs
  36. available (ToolMenu, ToolManager, ToolsDaemon come to mind). Then
  37. you access it just like you access Information: select the files and
  38. dirs, and then chose GroupInfo from the menus.
  39.  
  40. If you pass it just one file or dir, then GroupInfo imports that
  41. file's or dir's tooltypes, stack, comment, default tool and
  42. protection bits, just like Information.
  43.  
  44.  
  45.  
  46.  
  47.  
  48.   The Window & it's Gadgets:
  49.  
  50. Once the window opens, you see something which vaguely resembles the
  51. Information window, but with a few modifications:**
  52.  
  53. ** There are actually two different layouts of the gadgets possible.
  54. Here I describe what is know internally as the standard layout,
  55. which is the one GroupInfo tries first to use. However if you are
  56. running GroupInfo on a small workbench screen, and/or with a very
  57. large font, it might fall back to the alternate layout, which
  58. contains all the gadgets which the standard layout contains, but not
  59. in the same places. Since it's not all that hard to figure out what
  60. is what, I'll speak no more of this.
  61.  
  62.  
  63. Instead of a single file's or dir's icon, you are shown a list of
  64. all the objects you selected. The gadgets [Add...],[Del] and [Del
  65. All] below this list let you add and remove from the list. The file
  66. requester shown in response to [Add...] allows multiple file
  67. selection (shift-click on the names, instead of just clicking) in
  68. order to add a lot of files or dirs at once. You can also add
  69. objects by picking up their icons (from a workbench window) and
  70. dropping them on the object list. The text box below the list shows
  71. the selected object, which would be deleted if the [Del] button
  72. where pressed.
  73.  
  74.  
  75. Below the object list is the tooltype list. The tooltypes list area
  76. includes 3 gadgets not found in the Information window, along with
  77. the expected [New] and [Del].
  78.  
  79. [Import...] lets you add to the list the tooltypes of a file or dir
  80. (it pops a file requester). You can also import tooltypes from files
  81. by dropping their icons on the tooltype list.
  82.  
  83. [Del All], similarly to that found with the object list, deletes all
  84. the tooltypes from the list.
  85.  
  86. The cycle gadget above the tooltypes list cycles through the action
  87. to be performed to the tooltypes of the objects listed in the object
  88. list.
  89.  
  90. [      -       ] does nothing.
  91.  
  92.  
  93. [Add or Replace] adds the tooltypes in the list to those already
  94. belonging to the objects, replacing those which match with the value
  95. from the tooltype list, leaving unchanged any which do not match any
  96. in the tooltype list, and finally, adding those which appear in the
  97. tooltype list and not in the object.
  98.  
  99. For example, if the tooltype list contained
  100.  
  101.     CX_POPUP=NO
  102.     STARTUPPRI=0
  103.  
  104. and the object contained
  105.  
  106.     CX_POPUP=YES
  107.     DONOTWAIT
  108.  
  109. after GroupInfo got done with things (after you'd pressed [Execute]
  110. or [Execute & Exit]), the object would contain
  111.  
  112.     CX_POPUP=NO
  113.     STARTUPPRI=0
  114.     DONOTWAIT
  115.  
  116. The CX_POPUP=YES tooltype was replaced by the one from the list
  117. since the list already contained a CX_POPUP=<something> tooltype.
  118. The STARTUPPRI=0 tooltype was added since there was no
  119. STARTUPPRI=<something> tooltype in the object. The DONOTWAIT
  120. tooltype passed through unchanged since the list did not contain any
  121. DONOTWAIT<something> tooltypes.
  122.  
  123. The thing to understand is that tooltypes are matched by the
  124. argument name, and not by its value. In other words, tooltypes are
  125. matched by the text to the left of the `=', or the whole line if
  126. there is no `='.
  127.  
  128.  
  129. [   Uncomment  ] uncomments tooltypes which match those in the list.
  130. (commenting out tooltypes is the prefered way to render them
  131. inactive, rather than deleting them outright, since when you want to
  132. add them back on you don't have to look them up again. It is done
  133. manually by enclosing the tooltype line in parenthesis.) I.e. If the
  134. list contained
  135.  
  136.     DONOTWAIT
  137.     CX_POPUP
  138.  
  139. and the object contained
  140.  
  141.     (DONOTWAIT)
  142.     CX_POPUP=YES
  143.     CX_POPKEY=LAmiga RAmiga Control X
  144.  
  145. after GroupInfo finished the object would contain
  146.  
  147.     (DONOTWAIT)
  148.     (CX_POPUP=YES)
  149.     CX_POPKEY=LAmiga RAmiga Control X
  150.  
  151. The DONOTWAIT line was already commented out, so there was no point
  152. in commenting it out a second time. The CX_POPUP line was commented
  153. out since it matched the CX_POPUP line in the list. And the
  154. CX_POPKEY line pass through since it matched no lines in the list.
  155.  
  156.  
  157. [  Comment Out    ] does, as you would expect, exactly the opposite of
  158. [Uncomment]. Any tooltypes which match those in the list are
  159. commented out. The rest are left unchanged.
  160.  
  161.  
  162. [  Replace All    ] replaces the object's tooltypes with those in the
  163. list, without keeping any which do not match (in other words, it
  164. completely replaces the object's tooltypes---the previous tooltypes
  165. are ignored and deleted).
  166.  
  167. Also the interactions between [New], [Del], the text entry box and
  168. the list are more fluid than those in Information. The string starts
  169. out in New mode, and stays that way while you enter many
  170. tooltypes---no need to click on [New] all the time. And after
  171. deleting a tooltype, the next on in the list is shown in the text
  172. entry box, and pressing [Del] another time deletes that one---no
  173. need to click on an item in the list and then on [Del] all the time.
  174.  
  175.  
  176. In the right hand column, starting at the top, there are two
  177. information boxes, Files' Size, which shows the total size of all
  178. the files in the object list, and Total Size, which if not zero,
  179. shows the total size of all the files contained inside any
  180. directories and/or devices in the object list. Since this can take
  181. time to compute, this is not done automatically. Rather the button
  182. just below, [Compute Total Size], begins that computation.
  183.  
  184.  
  185. Below are cycle gadgets which define what manupulation should be
  186. performed to the object's protection bits. Unlike the C= Information
  187. window, which only has two states for these bits, I have three, and
  188. so could not use a `checked or unchecked' to show their state.
  189. Instead [  -  ], like with the tooltypes, means do not change that
  190. bit. [ Set ] sets that bit (equivalent to checking that item in
  191. Information), and [Clear] clears that bit (equivalent to unchecking
  192. that item in Information). You can set these to a file's protection
  193. bits by dropping the file's icon on these.
  194.  
  195.  
  196. Below are three text entry gadgets, and three corresponding action
  197. cycle gadgets. Stack lets you set the object's stack size, Comment
  198. lets you set the object's comment, and Default Tool lets you set the
  199. object's default tool. Again [ - ] means `do not change', and [Set]
  200. means `do change'. You can import a file's stack, comment or default
  201. tool by dropping it's icon on the corresponding area of the window.
  202.  
  203.  
  204. Across the bottom of the window are four buttons. The two on the
  205. left have GroupInfo go off and actually perform the changes you've
  206. selected above. [Execute & Exit] performs the changes and then quits
  207. GroupInfo, just like [Save] in Information. [Execute] simply
  208. performs the changes. On the right [Clear Actions] resets all the
  209. action gadgets to `do nothing'. [Cancel] quits GroupInfo without
  210. doing anything, just like [Cancel] in Information.
  211.  
  212. As in Information, the close button on the window is equivalent to
  213. [Cancel].
  214.  
  215.  
  216.  
  217.  
  218.  
  219.   ToolTypes:
  220.  
  221. GroupInfo understands several tooltypes, though none are required.
  222.  
  223. LEFTEDGE=<pixel position of left edge of unzipped window>
  224. TOPEDGE=<pixel position of top edge of unzipper window>
  225. ZLEFTEDGE=<pixel position of left edge of zipped window>
  226. ZTOPEDGE=<pixel position of top edge of zipper window>
  227.  
  228. these four allow you to specify where the upzipped and zipped
  229. windows should appear. The easiest way to set these is to start
  230. GroupInfo going, put the window where you want it, and chose `Save
  231. Window Position' from the menu, but if you like to type in pixel
  232. numbers by hand, feel free to do so.
  233.  
  234. LAYOUT=<standard or alternate>
  235.  
  236. this lets you specify which layout you prefer.
  237.  
  238. FONT=<name.font/height>
  239.  
  240. and this lets you select the font you prefer.
  241. These last two can be set by selecting `Save Font & Layout' from
  242. GroupInfo's menu, but if you want a font which GroupInfo is not
  243. using at that time, you'l have to type it in yourself.
  244.  
  245. REFRESH=<smart or simple>
  246.  
  247. this lets you chose the manner in which the GroupInfo window will be
  248. refreshed (redrawn). Smart refresh is fast, but chip ram is required
  249. to save the obscured portions of the window. Simple refresh requires
  250. no chip ram, but GroupInfo has to redraw newly uncovered regions of
  251. the window, which takes time. The refresh mode does not effect
  252. GroupInfo's operation, so choose the one you prefer. (these are the
  253. same modes as are selected with /SIMPLE and /SMART when opening a
  254. CON: window, if that means anything to you). The default is smart
  255. refresh.
  256.  
  257. So the tooltypes could look like
  258.  
  259. LEFTEDGE=30
  260. TOPEDGE=32
  261. ZLEFTEDGE=10000
  262. LAYOUT=standard
  263. FONT=times.font/13
  264. REFRESH=smart
  265.  
  266. and they would give me an unzipped window at (30,32), and a zipped
  267. window at the top right edge of my screen (10000 is larger than the
  268. width of my screen, so the zipped window will go as far as it can).
  269. GroupInfo will first try the standard layout with times.font size 13
  270. (it will fall back to other fonts and layouts if my screen is too
  271. small, or if it can't find the times.font size 13). And the window
  272. will use smart refresh.
  273.  
  274.  
  275.  
  276.  
  277.  
  278.   The Menus:
  279.  
  280. The `Project' menu contains only `About', which shows name, version
  281. and copyright information.
  282.  
  283. The `Preferences' menu contains two items to save various parts of
  284. the current settings to GroupInfo's tooltypes.
  285.  
  286. `Save Window Position' saves the current window position in the
  287. LEFTEDGE and TOPEDGE tooltypes if the window is unzipped, and in the
  288. ZLEFTEDGE and ZTOPEDGE tooltypes if the windiw is zipped.
  289.  
  290. `Save Font & Layout' saves the current font and layout in the FONT
  291. and LAYOUT tooltypes.
  292.  
  293. The reason it in interresting to save these is the following: when
  294. GroupInfo has to fall back to smaller fonts and alternate layouts,
  295. it takes time for it to try and reject each layout. By using this
  296. menu item to save the layout and font that GroupInfo finaly used you
  297. save time, since the next time you start GroupInfo it will try this
  298. configuration first (and hopefully it will still work---it if
  299. doesn't then GroupInfo will go through the long fallback routine and
  300. you haven't save any time, but the hope is that this will not be the
  301. case). Of course you can also edit these two tooltypes to specify a
  302. layout and a font which are not the current ones (in order to try
  303. something new, for instance), but to do that you'd type the values
  304. in yourself---this menu item will only save out the current font and
  305. layout.
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  Details:
  312.  
  313. 1) Tooltypes are matched by the argument's name, in a locale
  314. sensative, case independent, manner (utiltity.library/Stricmp()).
  315. The argument's value (if even present) is disregarded. Therefor when
  316. [Comment Out]ing or [Uncomment]ing tooltypes, any argument values
  317. present in the listed tooltypes are ignored.
  318.  
  319. 2) Tooltypes are considered commented out if they begin with a `(',
  320. and not if they do not.
  321.  
  322. 3) When [Uncomment]ing tooltypes, GroupInfo does not flag tooltypes
  323. in the objects which contain brackets. Thus a tooltype like
  324.  
  325.     (PASTEKEY=<key>)
  326.  
  327. will be uncommented to
  328.  
  329.     PASTEKEY=<key>
  330.  
  331. which is not correct, since the ``<key>'' should be replaced by the
  332. actually key desired when the tooltype is uncommented. For the
  333. moment you, the user, have to watch out for this.
  334.  
  335. 4) The file requesters have as default pattern ~(#?.info), which
  336. causes them to not show any icon files. However I do allow the user
  337. to edit this, and then to select icon files. (Sometimes you want to
  338. mess with icons' protection bits, for example).
  339.  
  340. 6) The GroupInfo window is completely font sensative. (Unlike the
  341. Information window, which, like many of C='s programs, insists on
  342. using topaz 8, even when the default font is also 8x8. Forcing topaz
  343. 8 is NOT font sensative programing by any stretch of anyone's
  344. imagination, except C='s, and it IS definitely user insensative
  345. programing). GroupInfo will lay itself out in Times 15 if you ask
  346. for it (give GroupInfo a tooltype FONT=times.font/15) However it can
  347. happen that, while in the process of laying out the contents of the
  348. window, GroupInfo discovers that it couldn't open a window large
  349. enough to hold everything. It deals with this with two strategies:
  350. it can use an alternate, smaller, less pleasing (to me at least)
  351. layout, and it can fall back to the workbench screen's font, the
  352. system's default font, and then to topaz 8. You _will_ see this
  353. behavior if you try to run GroupInfo on a 640 by 200 workbench
  354. (standard non-interlaced wb): the normal window layout is too tall,
  355. given an 8 x 8 fixed width font. GroupInfo will probably fall back
  356. all the way to topaz 8 with the alternate layout. (And you will note
  357. that the alternate layout, given an 8x8 font, a screen font no more
  358. than 9 pixels high, and the standard border thicknesses, just barely
  359. fits on an 640x200 screen. That is not by accident. :) If nothing
  360. fits, GroupInfo gives up with an error message saying "the window
  361. will not fit in the screen". The only way to get GroupInfo to work
  362. is to either make the screen larger, or make the screen's font
  363. smaller (changing GroupInfo's font at this point makes no
  364. difference, since it has already fallen all the way back to topaz 8
  365. before giving up)(unless you can stand a font smaller then 8, in
  366. which case changing to that font could help).
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  Changes:
  373.  
  374. new in 1.04:
  375.  
  376. 1) error messages all over the place.
  377.  
  378. new in 1.03:
  379.  
  380. 1) If started with only one argument, it imports everything from
  381. that argument, which makes it like Information.
  382.  
  383. 2) fix: the tooltype list is now correctly scrolled to the bottom
  384. when a new tooltype string is added to it.
  385.  
  386. 3) bug fix: after adding to the tooltype list, the object list was
  387. unselectable until something was added to it. (Actually the bug was
  388. much much more serious---the own_tooltypelist routine actually asked
  389. gadtools for the object listview's list, instead of the tooltype
  390. listview's list! A fine recipe for a non-reproducible crash if the
  391. wrong things happen at the wrong time.)
  392.  
  393. 4) fix: It seems that GetDiskInfo(), when passed a null string for
  394. the name, and when the CurrentDir is the root dir of a filesystem,
  395. fails, instead of looking for a file called `disk.info'---it just
  396. does the `normal' thing of looking in the ParentDir for a file with
  397. the name `<name of CurrentDir lock>.info. Grrrr. So I wrapped
  398. GetDiskInfo with some code to handle this situation (PutDiskInfo in
  399. execute too). Now you can drop disks on the default tool area and
  400. import the disk's default tool, and you can modify a disk's icon.
  401. (You may have though you could before, but that was only because
  402. there was no error msg from GroupInfo. If you looked at the disk
  403. icon later you'd see that nothing had been changed.)
  404.  
  405. 5) played with a lot of little things involving the flow of the
  406. user interface. the most visible change is that the long operations
  407. (execute and compute total size) now disable all gadgets that should
  408. not be used when they are running (i.e. you can't change the object
  409. list while computing the total size, since the total size routine
  410. uses the object list). All not-ghosted gadgets may be played with
  411. while the operation is in progress, and while I was at it, menu
  412. items too, and window refreshing also still takes place. And,
  413. finally, pressing [Cancel] or the close window button cancels the
  414. long operation in progress.
  415.  
  416. new in 1.02:
  417.  
  418. 1) fix: [Clear Actions] no longer clears the Stack, Comment and
  419. Default Tool strings.
  420.  
  421. 2) bug fix: during the exit code I was removing the lists from the
  422. listview gadgets after I had closed the window! If GroupInfo was
  423. crashing upon exit, and/or drawing in the workbench screen itself,
  424. and other strange things upon exit, this bug could have been causing
  425. it.
  426.  
  427. 3) Some tooltypes for GroupInfo to store away some preferences
  428. items, and menu items to write the preferences to the icon
  429. automatically.
  430.  
  431. 4) Added a tooltype to choose between simple and smart refresh
  432. modes. Smart is still the default.
  433.  
  434. 5) Made the window an AppWindow. You can drop icons on various area
  435. and the appropriate action takes place.
  436.  
  437. new in 1.01:
  438.  
  439. 1) Big bug fix: try passing a drawer or a disk to version 1.00 at
  440. startup. Boom! (Especially with the disk, it happens even faster ---
  441. there were two seperate bugs). All this is fixed, and while I was at
  442. it I changed the code so that it correctly appends a `:' to disks
  443. which are passed in from workbench, and appends a `/' to dirs.
  444.  
  445.  
  446.